<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_distributor.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_distributor.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '分销商管理',
                    name: 'Mall_distributor',
                    url: "/Distributors/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"distributorName":"","distributorCode":"","roleId":"","smsId":"","smsMode":"","distributorStartTime":"","distributorEndTime":"","distributorType":"","accountsId":"","contactPerson":"","contactPhone":"","isAvailable":"","modifier":"","modifyID":"","modifyDate":"","createDate":"","createID":"","creator":"","isAvailable":""},
                editFormOptions: [
                                [{"title":"分销商名称","required":true,"field":"distributorName","type":"text"},
                                 {"title":"分销商编码","field":"distributorCode","type":"text",hidden:true}],
                                // [{"title":"分销商权限","required":true,"field":"roleId","type":"select","dataKey": "mall_Distributor"},
                                //  {"title":"分销商类型","required":true,"field":"distributorType","type":"select","dataKey": "distributor_Type"}],
                                [{"title":"短信模板","required":true,"field":"smsId","type":"select","dataKey": "sms"},
                                {"title":"短信模式","required":true,"field":"smsMode","type":"select","dataKey": "sms_mode"}],
                                [{"title":"开始时间","required":true,"field":"distributorStartTime","type":"datetime"},
                                {"title":"结束时间","required":true,"field":"distributorEndTime","type":"datetime"}],
                                 [{"title":"联系人","required":true,"field":"contactPerson","type":"text"},
                                 {"title":"联系人电话","required":true,"field":"contactPhone","type":"phone"}],
                                 [{"title":"分销商类型","required":true,"field":"distributorType","type":"select","dataKey": "distributor_Type"},
                                 {"title":"应收账户","required":true,"field":"accountsId","type":"select","dataKey": "mall_account"}],
                                [{"title":"是否可用","required":true,"field":"isAvailable","type":"switch"},{"title":"入园人次","required":true,"field":"spare2","type":"number"}]
                                 ],
                searchFormFields: {"distributorCode":"","distributorName":"","distributorType":"","roleId":"","distributorStartTime":"","distributorEndTime":"","creator":"","createDate":"","modifyDate":""},
                searchFormOptions: [[{"title":"分销商编码","field":"distributorCode","type":"like"},{"title":"分销商名称","field":"distributorName","type":"like"},{"title":"分销商类型","field":"distributorType","type":"select","dataKey": "distributor_Type"}],[{"title":"分销商权限","field":"roleId","type":"select","dataKey": "mall_Distributor"},{ "title": "分销商合约开始时间", "field": "distributorStartTime", "type": "datetime" },{ "title": "分销商合约结束时间", "field": "distributorEndTime", "type": "datetime" },],
                [{ "title": "创建时间", "field": "createDate", "type": "datetime" }, 
       ]],
                columns: [{field:'id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'distributorName',title:'分销商名称',type:'string',width:180,align:'left',sortable:true},
                       //{field:'distributorCode',title:'分销商编码',type:'string',width:180,align:'left'},
                      // {field:'roleId',title:'分销商权限',type:'string',bind: { key: 'mall_Distributor', data: [] },width:90,align:'left'},
                      // {field:'smsId',title:'短信编码',type:'string',bind: { key: 'sms', data: [] },width:90,align:'left'},
                       {field:'smsMode',title:'短信模式',type:'string',bind: { key: 'sms_mode', data: [] },width:100,align:'left'},
                       {field:'distributorStartTime',title:'合约开始时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'distributorEndTime',title:'合约结束时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'distributorType',title:'分销商类型',bind: { key: 'distributor_Type', data: [] },type:'int',width:100,align:'left'},
                       {field:'accountsId',title:'应收账户',type:'int',bind: { key: 'mall_account', data: [] },width:100,align:'left'},
                       {field:'contactPerson',title:'联系人',type:'string',width:100,align:'left'},
                       {field:'contactPhone',title:'联系人电话',type:'string',width:150,align:'left'},
                       {field:'spare2',title:'入园人次',type:'string',width:220,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:160,align:'left',sortable:true},
                    //    {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:160,align:'left',sortable:true},
                    //    {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:180,align:'left'},
                    //    {field:'isAvailable',title:'是否可用',type:'int',width:90,align:'left'},
                    //    {field:'spare1',title:'扩展字段1',type:'string',width:220,align:'left'},
                        
                    //    {field:'spare3',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare4',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare5',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare6',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare7',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare8',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare9',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare10',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare11',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare12',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare13',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare14',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare15',title:'扩展字段1',type:'string',width:220,align:'left'}
                    ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
